package com.tcmj.system.service.impl;

import java.util.List;
import com.tcmj.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tcmj.system.mapper.BizIncomeplayinfoMapper;
import com.tcmj.system.domain.BizIncomeplayinfo;
import com.tcmj.system.service.IBizIncomeplayinfoService;
import com.tcmj.common.core.text.Convert;

/**
 * 收支记录Service业务层处理
 * 
 * @author tcmj
 * @date 2020-04-21
 */
@Service
public class BizIncomeplayinfoServiceImpl implements IBizIncomeplayinfoService 
{
    @Autowired
    private BizIncomeplayinfoMapper bizIncomeplayinfoMapper;

    /**
     * 查询收支记录
     * 
     * @param produceId 收支记录ID
     * @return 收支记录
     */
    @Override
    public BizIncomeplayinfo selectBizIncomeplayinfoById(Long produceId)
    {
        return bizIncomeplayinfoMapper.selectBizIncomeplayinfoById(produceId);
    }

    /**
     * 查询收支记录列表
     * 
     * @param bizIncomeplayinfo 收支记录
     * @return 收支记录
     */
    @Override
    public List<BizIncomeplayinfo> selectBizIncomeplayinfoList(BizIncomeplayinfo bizIncomeplayinfo)
    {
        return bizIncomeplayinfoMapper.selectBizIncomeplayinfoList(bizIncomeplayinfo);
    }

    /**
     * 新增收支记录
     * 
     * @param bizIncomeplayinfo 收支记录
     * @return 结果
     */
    @Override
    public int insertBizIncomeplayinfo(BizIncomeplayinfo bizIncomeplayinfo)
    {
        bizIncomeplayinfo.setCreateTime(DateUtils.getNowDate());
        return bizIncomeplayinfoMapper.insertBizIncomeplayinfo(bizIncomeplayinfo);
    }

    /**
     * 修改收支记录
     * 
     * @param bizIncomeplayinfo 收支记录
     * @return 结果
     */
    @Override
    public int updateBizIncomeplayinfo(BizIncomeplayinfo bizIncomeplayinfo)
    {
        bizIncomeplayinfo.setUpdateTime(DateUtils.getNowDate());
        return bizIncomeplayinfoMapper.updateBizIncomeplayinfo(bizIncomeplayinfo);
    }

    /**
     * 删除收支记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBizIncomeplayinfoByIds(String ids)
    {
        return bizIncomeplayinfoMapper.deleteBizIncomeplayinfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除收支记录信息
     * 
     * @param produceId 收支记录ID
     * @return 结果
     */
    @Override
    public int deleteBizIncomeplayinfoById(Long produceId)
    {
        return bizIncomeplayinfoMapper.deleteBizIncomeplayinfoById(produceId);
    }
}
